import {BrowserRouter as Router,Routes,Route} from "react-router-dom"
import App from "@/App"
import Login from '@/views/login/Login'
import Reg from '@/views/reg/Reg'
// 懒加载
import {lazy} from "react"
// import Home from '@/views/home/Home'
const Home = lazy(()=>import("@/views/home/Home"))
const User = lazy(()=>import('@/views/user/User'))
const Fast = lazy(()=>import('@/views/fast/Fast'))
const Toggle = lazy(()=>import('@/views/Toggle/Toggle'))
const Select = lazy(()=>import("@/views/SelectPractice/SelectPractice"))
const Practice = lazy(()=>import("@/views/Practice/Practice"))
// import User from '@/views/user/User'
// import Fast from '@/views/fast/Fast'
// import Toggle from '@/views/Toggle/Toggle'
// import Select from "@/views/SelectPractice/SelectPractice"
// import Practice from "@/views/Practice/Practice"

const router = (
  <Router>
    <Routes>
      <Route path="/" element={<App />}>
        <Route path="/home" element={<Home />}></Route>
        <Route path="/fast" element={<Fast />}></Route>
        <Route path="/user" element={<User />}></Route>
        <Route path="/toggle" element={<Toggle />}></Route>
        <Route path="/select/:actionCode" element={<Select />}></Route>
        <Route path="/practice" element={<Practice />}></Route>
      </Route>
      <Route path="/login" element={<Login />}></Route>
      <Route path="/Reg" element={<Reg />}></Route>
    </Routes>
  </Router>
)
export default router